#!/bin/sh

# 从命令行参数获取模型名称
model_name=$1

# 根据模型名称选择路径
if [ "$model_name" = "llama" ]; then
    model_path="/science/ssz/cpm/finetune/llamapro/open-instruct/weight/Llama-2-7b-hf"
elif [ "$model_name" = "llamapro" ]; then
    model_path="/science/ssz/cpm/finetune/llamapro/open-instruct/output/LLaMA-Pro-CPM/checkpoint-4716"
else
    echo "Error: Model name '$model_name' is not valid."
    exit 1
fi

# 执行命令
gg lm_eval --model hf \
    --model_args "pretrained=${model_path}" \
    --tasks toxigen,mmlu,nq_open,triviaqa,truthfulqa,gsm8k,openbookqa,winogrande,arc_easy,arc_challenge \
    --batch_size auto:1 \
    --device cuda:1 \
    --output_path "./eval_out/${model_name}"
    # --use_cache ./eval_cache
